fs = 50000;
f = [10000,25000];    % 边界频率为模拟频率
m = [1,0];
Rp = 1;
Rs = 60;
dat1 = (10^(Rp/20)-1)/(10^(Rp/20)+1);
dat2 = 10^(-Rs/20);
rip = [dat1,dat2];
[M,fo,mo,w] = remezord(f,m,rip,fs);
hn = remez(M,fo,mo,w);
M = M+1;
wd1 = boxcar(M)';     % 矩形窗
h1 = hn.*wd1;         % 加窗
[H1,w] = freqz(h1,1); 
figure(1)
stem(hn);
title('单位脉冲响应');
figure(2)
plot(w/pi,20*log10(abs(H1)));    % 幅频特性
title('幅频特性响应');
figure(3)
plot(w/pi,20*log10(angle(H1)));  % 相频特性
title('相频特性响应');
